<?php
/**
 * QQAS - share your knowledge to the world!
 *
 * @author		xiaochong0302 <xiaochong0302@gmail.com>
 * @copyright	Copyright (c) 2011, Koogua Studio.
 * @license		http://www.qqas.org/user_guide/license.html
 * @link		http://www.qqas.org
 * @since		Version 1.0
 * @filesource
 */



class LinkModel extends Model
{

	//缓存链接
	public function cacheLinks()
	{
	    $results = $links = array();
    	$where  = array('status' => 1);
    	$order  = array('display_order' => 'asc');
    	$result = $this->where($where)->order($order)->select();
    	if (!empty($results))
    	{
    		foreach ($results as $value)
    		{
    			$links[$value['link_id']] = $value;
    		}
    		F('cache_links', $links);
    	}
	}

}


/* End of file LinkModel.class.php */
/* Location: ./App/Lib/Model/LinkModel.class.php */
